package com.gaohe.hotal.service.impl;

import java.util.List;
import com.gaohe.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.gaohe.hotal.mapper.HotRoomLogMapper;
import com.gaohe.hotal.domain.HotRoomLog;
import com.gaohe.hotal.service.IHotRoomLogService;

/**
 * 房间日志Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-07-02
 */
@Service
public class HotRoomLogServiceImpl implements IHotRoomLogService 
{
    @Autowired
    private HotRoomLogMapper hotRoomLogMapper;

    /**
     * 查询房间日志
     * 
     * @param roomLogId 房间日志主键
     * @return 房间日志
     */
    @Override
    public HotRoomLog selectHotRoomLogByRoomLogId(Long roomLogId)
    {
        return hotRoomLogMapper.selectHotRoomLogByRoomLogId(roomLogId);
    }

    /**
     * 查询房间日志列表
     * 
     * @param hotRoomLog 房间日志
     * @return 房间日志
     */
    @Override
    public List<HotRoomLog> selectHotRoomLogList(HotRoomLog hotRoomLog)
    {
        return hotRoomLogMapper.selectHotRoomLogList(hotRoomLog);
    }

    /**
     * 新增房间日志
     * 
     * @param hotRoomLog 房间日志
     * @return 结果
     */
    @Override
    public int insertHotRoomLog(HotRoomLog hotRoomLog)
    {
        hotRoomLog.setCreateTime(DateUtils.getNowDate());
        return hotRoomLogMapper.insertHotRoomLog(hotRoomLog);
    }

    /**
     * 修改房间日志
     * 
     * @param hotRoomLog 房间日志
     * @return 结果
     */
    @Override
    public int updateHotRoomLog(HotRoomLog hotRoomLog)
    {
        hotRoomLog.setUpdateTime(DateUtils.getNowDate());
        return hotRoomLogMapper.updateHotRoomLog(hotRoomLog);
    }

    /**
     * 批量删除房间日志
     * 
     * @param roomLogIds 需要删除的房间日志主键
     * @return 结果
     */
    @Override
    public int deleteHotRoomLogByRoomLogIds(Long[] roomLogIds)
    {
        return hotRoomLogMapper.deleteHotRoomLogByRoomLogIds(roomLogIds);
    }

    /**
     * 删除房间日志信息
     * 
     * @param roomLogId 房间日志主键
     * @return 结果
     */
    @Override
    public int deleteHotRoomLogByRoomLogId(Long roomLogId)
    {
        return hotRoomLogMapper.deleteHotRoomLogByRoomLogId(roomLogId);
    }
}
